package com.learnaop.javaaop.example.baseProxy.a01StaticProxy;

import com.learnaop.javaaop.example.baseProxy.service.BaseProxyUsedService;

public class BaseProxyUsedServiceProxy implements BaseProxyUsedService {

    private BaseProxyUsedService target;

    public BaseProxyUsedServiceProxy(BaseProxyUsedService target) {
        this.target = target;
    }

    @Override
    public String doSome(String msg) {
        System.out.println("目标对象之前的操作。。。");
        String res = target.doSome(msg);
        System.out.println("目标对象之后的操作。。。");
        // 对代理对象的增强，将结果全转换为大写， 然后返回
        return res.toUpperCase();
    }
}
